import { useState } from "react";

export default function Video({ videoDate }: { videoDate: string }) {
  const [isPlaying, setIsPlaying] = useState(false);
  return (
    <div className={`${videoDate ? "" : "hidden"}bg-gray-300`}>
      {videoDate && (
        <video
          className="w-[100%] h-auto"
          controls={true}
          onPlay={() => setIsPlaying(true)}
          onPause={() => setIsPlaying(false)}
          src={videoDate}
        ></video>
      )}
    </div>
  );
}
